import { DateTransformer } from './../utils/dateTransformer';
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';
import { Exclude, Expose, Transform, Type } from 'class-transformer';
import { CommonEntity } from './common.entity';

@Entity('sys_staff')
export class SysStaffEntity extends CommonEntity {
    // 将 int 类型的id转成string类型，防止前端精度缺失
    @PrimaryGeneratedColumn({ type: 'bigint' })
    id: string;

    @Column()
    username:string;

    @Column()
    password: string;

    @Column({comment:'0 女，1 男',default:'',length:1})
    sex: string;  
    
    @Column({comment:'0 正常，1 锁住',default:'0',length:1})
    locked:string;

    @Column({comment:'创建人',nullable:true})
    create_by:string; 

    @Column({comment:'更新人',nullable:true})
    update_by:string;
    
    roles: any;
}    